package com.ruge.controller;


import com.ruge.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("admin")
public class UserController {

    @Resource
    private UserService userService;

    // 查询 用户列表
    @PostMapping("pageListUser")
    public Map<String, Object> pageListUser(@RequestBody Map<String, String> params) {
        return userService.pageListUser(params);
    }

    // 查询 角色列表
    @PostMapping("pageListRole")
    public Map<String, Object> pageListRole(@RequestBody Map<String, String> params) {
        return userService.pageListRole(params);
    }

    // 查询 二级商品分类列表
    @PostMapping("pageListSpfl2")
    public Map<String, Object> pageListSpfl2(@RequestBody Map<String, String> params) {
        return userService.pageListSpfl2(params);
    }

    // 查询 分店列表
    @PostMapping("pageListFd")
    public Map<String, Object> pageListFd(@RequestBody Map<String, String> params) {
        return userService.pageListFd(params);
    }

}
